package com.tedu.egweibo.pojo.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Pattern;

@Data
public class UserRegDTO {
    @ApiModelProperty(value = "用户邮箱",required = true,example = "张三")
    @Pattern(regexp = "[\\u4e00-\\u9fa5]|^[a-zA-Z0-9]{1,30}$",message = "中文要求或英文1-30位")
    private String username;
    @ApiModelProperty(value = "用户密码",required = true,example = "123456")
    @Pattern(regexp = "^[a-zA-Z0-9]{6,30}$",message = "英文或数字6-30位")
    private String password;
    @ApiModelProperty(value = "用户昵称",required = true,example = "阿三")
    private String nickname;
}
